package com.hackintosh.builder.pattern;

/**
 * @description：建造者模式示例
 * @author：twislyn
 * @date：Created in 2021/05/09
 * @modified By：
 * @version: 1.0
 */
public class DecoratorTest {

    public static void main(String[] args) {
        try {
            // 装修队
            Decorator decorator = new SmartDecorator();
            // 包工头带队
            ProjectManager projectManager = new ProjectManager(decorator);
            // 开始装修
            Parlour parlour = projectManager.decorate();
            // 装修结果展示
            parlour.show();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
